﻿<dxc:DXWindow x:Class="ThanNhanTao.frmPhieuBenhNhan"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:dxc="http://schemas.devexpress.com/winfx/2008/xaml/core"
        Title="Thông tin bệnh nhân" WindowStartupLocation="CenterScreen"
        xmlns:local="clr-namespace:ConvertCustom;assembly=ThanNhanTao"
        dxc:ThemeManager.ThemeName="Office2007Blue" Icon="/ThanNhanTao;component/Images/iconbv48x48.ico" 
              xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
              xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors" WindowState="Maximized" Width="790" Height="550">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="336"></RowDefinition>
            <RowDefinition Height="166*"></RowDefinition>
            <RowDefinition Height="35"></RowDefinition>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="384*"></ColumnDefinition>
            <ColumnDefinition Width="384*" />
        </Grid.ColumnDefinitions>
        <GroupBox Header="Thông tin cơ bản" Height="330" FontWeight="Bold" Foreground="#FF190000" Grid.Column="0" Grid.Row="0">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="26"></RowDefinition>
                    <RowDefinition Height="26"></RowDefinition>
                    <RowDefinition Height="26"></RowDefinition>
                    <RowDefinition Height="26"></RowDefinition>
                    <RowDefinition Height="26"></RowDefinition>
                    <RowDefinition Height="26"></RowDefinition>
                    <RowDefinition Height="26"></RowDefinition>
                    <RowDefinition Height="26"></RowDefinition>
                    <RowDefinition Height="26"></RowDefinition>
                    <RowDefinition Height="26"></RowDefinition>
                    <RowDefinition Height="10*" />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="84"></ColumnDefinition>
                    <ColumnDefinition Width="96*"></ColumnDefinition>
                    <ColumnDefinition Width="62"></ColumnDefinition>
                    <ColumnDefinition Width="28" />
                    <ColumnDefinition Width="90*"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <Label Content="Họ và tên:" Grid.Column="0" Grid.Row="0" Name="label1" Margin="2,2,0,0" FontWeight="Bold" />
                <Label Content="Tuổi:" Grid.Column="0" Grid.Row="1" Name="label2" Margin="2,2,0,0" FontWeight="Bold" />
                <Label Content="Giới tính:" Grid.Column="2" Grid.Row="1" Name="label3" MinWidth="52" Margin="2,2,0,0" FontWeight="Bold" Grid.ColumnSpan="2" />
                <Label Content="Nghề nghiệp:" Grid.Column="0" Grid.Row="2" Name="label4" Margin="2,2,0,0" FontWeight="Bold" />
                <Label Content="Địa chỉ:" Grid.Column="0" Grid.Row="3" Name="label5" Margin="2,2,0,0" FontWeight="Bold" />
                <Label Content="Dân tộc:" Grid.Column="0" Grid.Row="4" Name="label6" Margin="2,2,0,0" FontWeight="Bold" />
                <dxe:CheckEdit Content="Ngoại tỉnh" Grid.Column="1" Grid.Row="5" Name="checkBoxNgoaiTinh" TabIndex="8" Margin="2" FontWeight="Bold" />
                <dxe:CheckEdit Content="BHYT" Grid.Column="2" Grid.Row="5" Name="checkBoxBHYT" TabIndex="9" Checked="checkBoxBHYT_Checked" Unchecked="checkBoxBHYT_Unchecked" Margin="2" FontWeight="Bold" Grid.ColumnSpan="2" />
                <Label Content="Số BHYT:" Grid.Column="0" Grid.Row="6" Name="label7" Margin="2,2,0,0" FontWeight="Bold" />
                <Label Content="Từ ngày:" Grid.Column="0" Grid.Row="7" Name="label8" Margin="2,2,0,0" FontWeight="Bold" />
                <Label Content="Đến ngày:" Grid.Column="2" Grid.Row="7" Name="label9" Margin="2,2,0,0" FontWeight="Bold" Grid.ColumnSpan="2" />
                <Label Content="Nơi giới thiệu:" Grid.Column="0" Grid.Row="8" Name="label10" Margin="2,2,0,0" FontWeight="Bold" />
                <dxe:TextEdit Grid.Column="1" LostFocus="textBoxHo_LostFocus"
                              Grid.ColumnSpan="3" Name="textBoxHo" MaxLength="30" TabIndex="1" 
                              Validate="check_Validate" CausesValidation="True" InvalidValueBehavior="AllowLeaveEditor" Margin="2" FontSize="13" FontWeight="Bold" />
                <dxe:TextEdit Grid.Column="4" Name="textBoxTen" LostFocus="textBoxTen_LostFocus" MaxLength="30" TabIndex="2" 
                              Validate="check_Validate" CausesValidation="True" InvalidValueBehavior="AllowLeaveEditor" Margin="2" FontSize="13" FontWeight="Bold" />
                <dxe:TextEdit Grid.Column="1" Grid.Row="1" Name="textBoxTuoi" MaskType="RegEx" Mask="\d{0,4}" LostFocus="textBoxTuoi_LostFocus"
                              MaskUseAsDisplayFormat="True" TabIndex="3" 
                              Validate="check_Validate" CausesValidation="True" InvalidValueBehavior="AllowLeaveEditor" Margin="2" FontSize="13" FontWeight="Bold" />
                <dxe:ComboBoxEdit AutoComplete="True"  Grid.Column="3" Grid.Row="1" Name="comboBoxGioiTinh" TabIndex="4" FontSize="13" FontWeight="Bold" Grid.ColumnSpan="2" Margin="2">
                    <dxe:ComboBoxEditItem Content="Nam" />
                    <dxe:ComboBoxEditItem Content="Nữ" />
                </dxe:ComboBoxEdit>
                <dxe:ComboBoxEdit AutoComplete="True" Grid.Column="1" Grid.Row="2" Grid.ColumnSpan="4"  Name="comboBoxNgheNghiep" TabIndex="5" Margin="2" FontSize="13" FontWeight="Bold" />
                <dxe:TextEdit Grid.Column="1" Grid.Row="3" 
                              Grid.ColumnSpan="4" Name="textBoxDiaChi" MaxLength="200" TabIndex="6" Margin="2" FontSize="13" FontWeight="Bold" />
                <dxe:ComboBoxEdit AutoComplete="True" Grid.Column="1" Grid.Row="4" Grid.ColumnSpan="4" Name="comboBoxDanToc" TabIndex="7" Margin="2" FontSize="13" FontWeight="Bold" />
                <dxe:TextEdit Grid.Column="1" Grid.Row="6" Grid.ColumnSpan="4" 
                              Mask="[A-Z]{2,2}[0-9]{1,1}[0-9]{2,2}[0-9]{2,2}[0-9]{3,3}[0-9]{5,5}-[0-9]{0,2}\.[0-9]{0,3}" MaskType="RegEx" MaskShowPlaceHolders="False" MaskSaveLiteral="False"
                              Name="textBoxSoBHYT" MaxLength="30" IsEnabled="False"
                              PreviewLostKeyboardFocus="textBoxSoBHYT_PreviewLostKeyboardFocus"
                              MaskUseAsDisplayFormat="False" TabIndex="10" Margin="2" FontSize="13" FontWeight="Bold" />
                <dxe:TextEdit Grid.Column="1" Grid.Row="8" Grid.ColumnSpan="4" Name="textBoxNoiGioThieu" MaxLength="50" TabIndex="13" Margin="2" FontSize="13" FontWeight="Bold" />
                <dxe:DateEdit Grid.Column="1" Grid.Row="7" 
                              DisplayFormatString="dd/MM/yyyy" Mask="dd/MM/yyyy" MaskCulture="vi-VN" 
                              Name="datePickerTuNgay" IsEnabled="False" TabIndex="11" Margin="2" FontSize="13" FontWeight="Bold" 
                              Validate="CheckValidate" 
                              InvalidValueBehavior="AllowLeaveEditor"
                              CausesValidation="False"
                              EditValueChanged="datePickerTuNgay_EditValueChanged"/>
                <dxe:DateEdit Grid.Column="3" Grid.Row="7" 
                              Name="datePickerDenNgay" DisplayFormatString="dd/MM/yyyy" Mask="dd/MM/yyyy" MaskCulture="vi-VN" 
                              IsEnabled="False" TabIndex="12" FontSize="13" FontWeight="Bold" Grid.ColumnSpan="2" Margin="2" 
                              Validate="CheckValidate" 
                              CausesValidation="False"
                              InvalidValueBehavior="AllowLeaveEditor"
                              EditValueChanged="datePickerTuNgay_EditValueChanged"/>
                <Label Content="Nơi ĐKBĐ:" Grid.Column="0" Grid.Row="9" Margin="2,2,0,0" FontWeight="Bold" />
                <dxe:TextEdit Grid.Column="1" Grid.Row="9" Grid.ColumnSpan="4" Name="txtNoiDKBD" Margin="2" FontSize="13" IsReadOnly="True" FontWeight="Bold" />
                
                <dxe:CheckEdit Content="Tạo hồ sơ mới cho bệnh nhân hiện tại" Grid.Column="1" Grid.Row="10" Grid.ColumnSpan="4" Name="checkBoxTaoHoSoMoi" TabIndex="100" Foreground="Red" Margin="2" FontWeight="Bold" Visibility="Hidden" Checked="checkBoxTaoHoSoMoi_Checked" Unchecked="checkBoxTaoHoSoMoi_Unchecked"/>
            </Grid>
        </GroupBox>
        <Grid Grid.Column="1" Grid.Row="0" Height="336">
            <Grid.RowDefinitions>
                <RowDefinition Height="30"></RowDefinition>
                <RowDefinition Height="33" />
                <RowDefinition Height="26"> </RowDefinition>
                <RowDefinition Height="26"></RowDefinition>
                <RowDefinition Height="26"></RowDefinition>
                <RowDefinition Height="26"></RowDefinition>
                <RowDefinition Height="26"></RowDefinition>
                <RowDefinition Height="26"></RowDefinition>
                <RowDefinition Height="52"></RowDefinition>
                <RowDefinition Height="52"></RowDefinition>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="92*"></ColumnDefinition>
                <ColumnDefinition Width="124*" />
                <ColumnDefinition MinWidth="80" Width="90"></ColumnDefinition>
                <ColumnDefinition MinWidth="70" Width="84*"></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <GroupBox Header="Phương pháp điều trị" Grid.Column="2" Grid.ColumnSpan="2" MinWidth="116" Grid.RowSpan="6" Margin="2" FontWeight="Bold">
                <dxe:TextEdit Name="textBoxPhuongPhapDieuTri" Text="" TextWrapping="Wrap" VerticalScrollBarVisibility="Auto" TabIndex="25" 
                              VerticalContentAlignment="Top" AcceptsReturn="True" FontSize="13" FontWeight="Bold" />
            </GroupBox>

            <Label Content="Số lần TNT:" Grid.Column="2" Name="label17" Grid.Row="2" Margin="2" FontWeight="Bold" Visibility="Hidden" />
            <Label Content="Số lần SLM:" Grid.Column="2" Name="label18" Grid.Row="3" Margin="2" FontWeight="Bold" Visibility="Hidden" />
            <Label Content="ML TPE2000:" Grid.Row="4" Grid.Column="2" Name="label19" FontWeight="Bold" Visibility="Hidden" />
            <Label Content="Túi đựng dịch:" Grid.Row="5" Grid.Column="2" Name="label20" Margin="2" FontWeight="Bold" Visibility="Hidden" />
            <!--<Label Content="ML Prisma:" Grid.Row="6" Grid.Column="2" Name="label21" Margin="2" FontWeight="Bold" />-->
            <Label Content="Nhóm máu:" Grid.Row="6" Grid.Column="2" Name="label21" Margin="2" FontWeight="Bold" />
            
            <!--<Label Content="MLPrismaflex:" Grid.Row="7" Grid.Column="2" Name="label22" Margin="2" FontWeight="Bold" />-->
            <Label Content="Khu vực:" Grid.Row="7" Grid.Column="2" Name="label22" Margin="2" FontWeight="Bold" />
            
            <Label Content="HemosolCitrat:" Grid.Row="8" Grid.Column="2" Name="label23" Margin="2" FontWeight="Bold" Visibility="Hidden" />
            <Label Content="Hemosol:" Grid.Row="9" Grid.Column="2" Name="label24" Margin="2" FontWeight="Bold" Visibility="Hidden" />

            <dxe:TextEdit Grid.Column="3" Name="textBoxSoLanTHT" MinWidth="36" TabIndex="26" Grid.Row="2" Margin="2" FontSize="13" FontWeight="Bold" Visibility="Hidden" />
            <dxe:TextEdit Grid.Column="3" Name="textBoxSoLanSLM" MinWidth="35" TabIndex="27" Grid.Row="3" Margin="2" FontSize="13" FontWeight="Bold" Visibility="Hidden" />
            <dxe:TextEdit Grid.Row="4" Grid.Column="3" Name="textBoxMLTPE2000" MinWidth="34" TabIndex="28" Margin="2" FontSize="13" FontWeight="Bold" Visibility="Hidden" />
            <dxe:TextEdit Grid.Row="5" Grid.Column="3" Name="textBoxTuiDungDich" MinWidth="49" TabIndex="29" Margin="2" FontSize="13" FontWeight="Bold" Visibility="Hidden" />
            
            <!--<dxe:TextEdit Grid.Row="6" Grid.Column="3" Name="textBoxMLPrisma" MinWidth="49" TabIndex="30" Margin="2" FontSize="13" FontWeight="Bold" />-->
            <dxe:ComboBoxEdit AutoComplete="True" Grid.Row="6" Grid.Column="3" MinWidth="49" Name="comboBoxNhomMau" TabIndex="30"
                              Margin="2" FontSize="13" FontWeight="Bold">
                <dxe:ComboBoxEditItem Content="AB"></dxe:ComboBoxEditItem>
                <dxe:ComboBoxEditItem Content="A"></dxe:ComboBoxEditItem>
                <dxe:ComboBoxEditItem Content="B"></dxe:ComboBoxEditItem>
                <dxe:ComboBoxEditItem Content="O"></dxe:ComboBoxEditItem>
                <dxe:ComboBoxEditItem Content="RH"></dxe:ComboBoxEditItem>                           
            </dxe:ComboBoxEdit>
            
            <!--<dxe:TextEdit Grid.Row="7" Grid.Column="3" Name="textBoxMLPrismaflex" MinWidth="49" TabIndex="31" Margin="2" FontSize="13" FontWeight="Bold" />-->
            <dxe:ComboBoxEdit AutoComplete="True" Grid.Row="7" Grid.Column="3" MinWidth="49" Name="comboBoxKhuVuc" TabIndex="31"
                              Margin="2" FontSize="13" FontWeight="Bold">
                <dxe:ComboBoxEditItem Content="Khu A"></dxe:ComboBoxEditItem>
                <dxe:ComboBoxEditItem Content="Khu B"></dxe:ComboBoxEditItem>
                <dxe:ComboBoxEditItem Content="Khu C"></dxe:ComboBoxEditItem>
                <dxe:ComboBoxEditItem Content="Khu D"></dxe:ComboBoxEditItem>
            </dxe:ComboBoxEdit>
            
            <dxe:TextEdit Grid.Row="8" Grid.Column="3" Name="textBoxHemosolCitrat" MinWidth="49" TabIndex="32" Margin="2" FontSize="13" FontWeight="Bold" Visibility="Hidden" />
            <dxe:TextEdit Grid.Row="9" Grid.Column="3" Name="textBoxHemosol" MinWidth="49" TabIndex="33" Margin="2" FontSize="13" FontWeight="Bold" Visibility="Hidden" />
            <Label Content="ID:" Name="label11" Margin="4" FontWeight="Bold" FontSize="14" Foreground="#FF2E9211" />
            <dxe:TextEdit IsReadOnly="True" Name="textBoxID" TabIndex="14" Grid.Column="1" Margin="2" FontWeight="Bold" FontSize="14" Foreground="#FFE83215" />
            <Label Content="Số nhập viện:" Name="label12" Grid.Row="1" Margin="4" FontWeight="Bold" FontSize="14" Foreground="#FF2E9211" />
            <dxe:TextEdit Grid.Column="1" Name="textBoxSoNhapVien" MinWidth="50" MaxLength="30" TabIndex="15" Validate="check_ValidateMaSoBN" CausesValidation="True" InvalidValueBehavior="AllowLeaveEditor" Grid.Row="1" Margin="2" FontWeight="Bold" FontSize="14" Foreground="#FFE83215" />
            <GroupBox Header="Ngày giờ" Grid.ColumnSpan="2" Grid.Row="2" Grid.RowSpan="5" Margin="2" FontWeight="Bold">
                <Grid Margin="2">
                    <Grid.RowDefinitions>
                        <RowDefinition></RowDefinition>
                        <RowDefinition></RowDefinition>
                        <RowDefinition></RowDefinition>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition MinWidth="60" Width="60"></ColumnDefinition>
                        <ColumnDefinition></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <Label Content="Vào viện:" Grid.Row="0" Grid.Column="0" Name="label13" Margin="2" FontWeight="Bold" />
                    <Label Content="Đến khoa:" Grid.Row="1" Grid.Column="0" Name="label14" Margin="2" FontWeight="Bold" />
                    <Label Content="Ra viện:" Grid.Row="2" Grid.Column="0" Name="label15" Margin="2" FontWeight="Bold" />
                    <dxe:DateEdit Grid.Row="0" Grid.Column="1" Name="datePickerVaoVien" 
                                  DisplayFormatString="dd/MM/yyyy H:mm" Mask="dd/MM/yyyy H:mm" 
                                  MaskCulture="vi-VN" TabIndex="16" Margin="2" FontSize="13" 
                                  FontWeight="Bold" 
                                  Validate="CheckValidate" 
                              CausesValidation="False"
                              InvalidValueBehavior="AllowLeaveEditor"
                              EditValueChanged="datePickerTuNgay_EditValueChanged"
                                  />
                    <dxe:DateEdit Grid.Row="1" Grid.Column="1" Name="datePickerDenKhoa" 
                                  DisplayFormatString="dd/MM/yyyy H:mm" Mask="dd/MM/yyyy H:mm" 
                                  MaskCulture="vi-VN" TabIndex="17" Margin="2" FontSize="13" FontWeight="Bold" 
                                  Validate="CheckValidate" 
                                  CausesValidation="False"
                              InvalidValueBehavior="AllowLeaveEditor"
                              EditValueChanged="datePickerTuNgay_EditValueChanged"/>
                    <dxe:DateEdit Grid.Row="2" Grid.Column="1" Name="datePickerRaVien" 
                                  DisplayFormatString="dd/MM/yyyy H:mm" Mask="dd/MM/yyyy H:mm" 
                                  MaskCulture="vi-VN" TabIndex="18" Margin="2" FontSize="13" 
                                  FontWeight="Bold" 
                                  Validate="CheckValidate" 
                              CausesValidation="False"
                              InvalidValueBehavior="AllowLeaveEditor"
                              EditValueChanged="datePickerTuNgay_EditValueChanged"
                              EditValueChanging="datePickerRaVien_EditValueChanging"
                                  />
                </Grid>
            </GroupBox>
            <Label Content="Chuyển đến:" Name="label16" Grid.Row="7" Margin="2" FontWeight="Bold" />
            <dxe:TextEdit Grid.Column="1" Name="textBoxChuyenDen" TabIndex="19" Grid.Row="7" Margin="2" FontSize="13" FontWeight="Bold" />
            <GroupBox Header="Tình hình tử vong" Margin="2 0 2 0" Grid.ColumnSpan="4" Grid.Row="8" FontWeight="Bold">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition></RowDefinition>
                        <!--<RowDefinition></RowDefinition>
                        <RowDefinition></RowDefinition>-->
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition></ColumnDefinition>
                        <ColumnDefinition></ColumnDefinition>
                        <ColumnDefinition></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <RadioButton Content="Tử vong" Name="checkBoxTuVong" Grid.Row="0" Grid.Column="0" GroupName="tuvongnang" Checked="checkBoxTuVong_Checked"/>
                    <RadioButton Content="Tạm dừng" HorizontalAlignment="Left" Grid.Row="0" Grid.Column="1" GroupName="tuvongnang" Name="checkBoxTuVong24" VerticalAlignment="Center" Checked="checkBoxTuVong_Checked"/>
                    <RadioButton Content="Nặng xin về" HorizontalAlignment="Left" Grid.Row="0" Grid.Column="2" GroupName="tuvongnang" Name="checkBoxNangXinVe" VerticalAlignment="Center" Checked="checkBoxTuVong_Checked"/>
                    <RadioButton Content="" Visibility="Hidden" HorizontalAlignment="Left" Grid.Row="0" Grid.Column="2" GroupName="tuvongnang" Name="checkBoxAn" VerticalAlignment="Center"/>
                    <!--<dxe:CheckEdit Content="Tử vong" Name="checkBoxTuVong" Grid.Row="0" Grid.Column="0" Checked="checkBoxTuVong_Checked"/>
                    <dxe:CheckEdit Content="Tử vong&lt;24" HorizontalAlignment="Left" Grid.Row="0" Grid.Column="1" Name="checkBoxTuVong24" VerticalAlignment="Center" Checked="checkBoxTuVong_Checked"/>
                    <dxe:CheckEdit Content="Nặng xin về" HorizontalAlignment="Left" Grid.Row="0" Grid.Column="2" Name="checkBoxNangXinVe" VerticalAlignment="Center" Checked="checkBoxTuVong_Checked"/>-->
                </Grid>
            </GroupBox>
            <GroupBox Header="Loại bệnh nhân" Margin="2 0 2 0" Grid.Row="9" Grid.ColumnSpan="2" FontWeight="Bold"  Panel.ZIndex="200">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition></RowDefinition>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition></ColumnDefinition>
                        <ColumnDefinition></ColumnDefinition>
                        <ColumnDefinition></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <RadioButton Content="Cấp cứu" Name="checkBoxCapCuu" Grid.Row="0" Grid.Column="0" GroupName="loaiBenhNhan"/>
                    <RadioButton Content="Mãn tính" HorizontalAlignment="Left" Grid.Row="0" Grid.Column="1" GroupName="loaiBenhNhan" Name="checkBoxManTinh" VerticalAlignment="Center"/>
                </Grid>
            </GroupBox>
            <GroupBox Header="Loại hồ sơ" Grid.Row="9" Grid.Column="2"  Grid.ColumnSpan="2" FontWeight="Bold"  Panel.ZIndex="200">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition></RowDefinition>
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition></ColumnDefinition>
                        <ColumnDefinition></ColumnDefinition>
                    </Grid.ColumnDefinitions>
                    <RadioButton Content="Ngoại trú" Name="checkBoxNgoaiTru" Margin="0 0 4 0" Grid.Row="0" Grid.Column="0" GroupName="loaiHoSo"/>
                    <RadioButton Content="Nội trú" Margin="10 0 0 0" HorizontalAlignment="Left" Grid.Row="0" Grid.Column="1" GroupName="loaiHoSo" Name="checkBoxNoiTru" VerticalAlignment="Center"/>
                </Grid>
            </GroupBox>
        </Grid>

        <GroupBox Header="Thông tin" Grid.Row="1" FontWeight="Bold" Grid.Column="0">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="30"></RowDefinition>
                    <RowDefinition Height="30"></RowDefinition>
                    <RowDefinition Height="30"></RowDefinition>
                    <RowDefinition></RowDefinition>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="150"></ColumnDefinition>
                    <ColumnDefinition Width="90"></ColumnDefinition>
                    <ColumnDefinition Width="90"></ColumnDefinition>
                    <ColumnDefinition></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <Label Content="Ngày chạy thận đầu tiên:" Name="lblNgayChayDauTien" VerticalAlignment="Center" Grid.Row="0" Margin="2" Grid.Column="0" FontWeight="Bold" HorizontalAlignment="Right"/>
                <dxe:DateEdit Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="2" Name="datePickerNgayChayDauTien" DisplayFormatString="dd/MM/yyyy H:mm" 
                              Mask="dd/MM/yyyy H:mm" MaskCulture="vi-VN" VerticalAlignment="Center" TabIndex="18" Margin="2" FontSize="13" FontWeight="Bold" />
                <TextBlock TextWrapping="WrapWithOverflow" Name="lblChayThongBao" Grid.Row="1" Grid.RowSpan="3" Margin="2" 
                       Grid.Column="0" Grid.ColumnSpan="4" FontSize="16" FontStyle="Normal" Foreground="Red" FontWeight="Normal" />
            </Grid>
        </GroupBox>

        <Grid Grid.Column="1" Grid.Row="1">
            <Grid.RowDefinitions>
                <RowDefinition Height="25"></RowDefinition>
                <RowDefinition Height="57*"></RowDefinition>
                <RowDefinition Height="24"></RowDefinition>
                <RowDefinition Height="90*"></RowDefinition>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="63"></ColumnDefinition>
                <ColumnDefinition Width="129*"></ColumnDefinition>
                <ColumnDefinition Width="47"></ColumnDefinition>
                <ColumnDefinition Width="145*"></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <Label Content="Chẩn đoán:" Name="label25" Grid.ColumnSpan="2" Margin="2" FontWeight="Bold" />
            <Label Content="Mã bệnh:" Grid.Row="2" Name="label26" Grid.ColumnSpan="2" Margin="2" FontWeight="Bold" />
            <Label Content="Ghi chú:" Grid.Column="2" Grid.Row="2" Name="label27" Margin="2" FontWeight="Bold" />
            
            <dxe:TextEdit Grid.Row="1" Grid.ColumnSpan="4" Name="textBoxChanDoan" TextWrapping="Wrap" VerticalContentAlignment="Top"
                          VerticalScrollBarVisibility="Auto" AcceptsReturn="True" MaxLength="200" TabIndex="21" Margin="2 2 2 23" FontSize="13" FontWeight="Bold" />

            <dxe:ComboBoxEdit AutoComplete="True"  x:Name="comboBoxBenhKem" TabIndex="22" Grid.Row="1" Grid.ColumnSpan="4" Margin="2 23 2 0"
                              FontSize="13" FontWeight="Bold" VerticalAlignment="Bottom" Height="22" ToolTip="Chọn bệnh kèm theo"
                              ShowSizeGrip="False" NullText="Chọn bệnh kèm" DisplayMember="TenChanDoan" ValueMember="MaChanDoan"
                              IsTextEditable="False" SeparatorString=";">
                <dxe:ComboBoxEdit.StyleSettings>
                    <dxe:CheckedComboBoxStyleSettings/>
                </dxe:ComboBoxEdit.StyleSettings>
            </dxe:ComboBoxEdit>
            
            <dxe:TextEdit Grid.Column="3" Grid.Row="2" Name="textBoxGhiChu" TextWrapping="Wrap" TabIndex="23" Margin="2" FontSize="13" FontWeight="Bold" />
            <dxe:ComboBoxEdit AutoComplete="True" Grid.Column="1" Grid.ColumnSpan="3" Name="comboBoxChanDoan" TabIndex="20"
                              Margin="2" FontSize="13" FontWeight="Bold" 
                              EditValueChanged="comboBoxChanDoan_EditValueChanged"
                              />
            <dxe:ComboBoxEdit AutoComplete="True" Grid.Column="1" Grid.Row="2" Name="comboBoxMaBenh" 
                              MinWidth="80" TabIndex="22" Margin="2" FontSize="13" FontWeight="Bold" 
                              EditValueChanged="comboBoxMaBenh_EditValueChanged"
                              />

            <GroupBox Header="Lời dặn" Grid.ColumnSpan="4" Grid.Row="3" Margin="2" FontWeight="Bold">

                <dxe:TextEdit VerticalContentAlignment="Top" AcceptsReturn="True" VerticalScrollBarVisibility="Auto" Name="textBoxLoiDan" TextWrapping="Wrap" TabIndex="24" Margin="2" FontSize="13" FontWeight="Bold" />
                
            </GroupBox>
        </Grid>

        
        
        <Button Content="P.nội trú" Margin="5,5,0,5" Grid.Row="2" Height="23" HorizontalAlignment="Left" Name="buttonPhieuNoiTru" VerticalAlignment="Center" MinWidth="81" ToolTip="Phiếu thanh toán ngoại trú" Click="buttonPhieuNoiTru_Click" FontWeight="Bold" />
        <Button Content="P.ngoại trú" Margin="98,6,0,6" Grid.Row="2" Height="23" HorizontalAlignment="Left" Name="buttonPhieuNgoaiTru" VerticalAlignment="Center" MinWidth="80" ToolTip="Phiếu thanh toán nội trú" FontWeight="Bold" Click="buttonPhieuNgoaiTru_Click" />
        <Button Content="Chạy thận" Margin="201,6,0,6" Grid.Row="2" Height="23" HorizontalAlignment="Left" Name="buttonChayThan" VerticalAlignment="Center" MinWidth="80" ToolTip="Phiếu chạy thận" Click="buttonChayThan_Click" FontWeight="Bold" />
        
        <Button Content="_Lưu" Margin="0,6,184,6" Grid.Row="2" Height="23" HorizontalAlignment="Right" Name="buttonLuu" VerticalAlignment="Center" MinWidth="80" Click="buttonLuu_Click" TabIndex="34" Grid.Column="1" FontWeight="Bold" />
        <Button Content="Xóa" Margin="0,6,94,6" Grid.Row="2" Height="23" HorizontalAlignment="Right" Name="buttonXoa" VerticalAlignment="Center" MinWidth="80" Click="buttonXoa_Click" TabIndex="35" Grid.Column="1" FontWeight="Bold" />
        <Button Content="Làm mới" Margin="0,7,286,5" Grid.Row="2" Height="23" HorizontalAlignment="Right" Name="buttonLamMoi" VerticalAlignment="Center" MinWidth="80" Click="buttonLamMoi_Click" Grid.Column="1" FontWeight="Bold" />
        <Button Content="Đóng" Margin="0,5,4,7" Grid.Row="2" Height="23" HorizontalAlignment="Right" Name="buttonDong" VerticalAlignment="Center" MinWidth="80" Click="buttonDong_Click" TabIndex="36" Grid.Column="1" FontWeight="Bold" />
    </Grid>
</dxc:DXWindow>
